package com.zc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zc.dao.ITemDao;
import com.zc.domain.FourPointsItem;
import com.zc.service.TemService;

@Service(value="temService")
public class TemServiceImpl implements TemService{
	@Autowired
	private ITemDao temDao;
	
	@Override
	public List<FourPointsItem> getSubTemperature() {
		List<FourPointsItem> result=temDao.getTemperature("fwd_h");
		for(FourPointsItem i:result) {
			i.setTimeStamp(i.getTimeStamp().substring(11, 13));
		}
		return result;
	}
	@Override
	public List<FourPointsItem> getMainTemperature() {
		List<FourPointsItem> result=temDao.getTemperature("mwd_h");
		for(FourPointsItem i:result) {
			i.setTimeStamp(i.getTimeStamp().substring(11, 13));
		}
		return result;
	}
}
